github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/saltpack.go (about)

     1  // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
     2  //   Input file: avdl/keybase1/saltpack.avdl
     3  
     4  package keybase1
     5  
     6  import (
     7  	"fmt"
     8  	"github.com/keybase/go-framed-msgpack-rpc/rpc"
     9  	context "golang.org/x/net/context"
    10  	"time"
    11  )
    12  
    13  type AuthenticityType int
    14  
    15  const (
    16  	AuthenticityType_SIGNED     AuthenticityType = 0
    17  	AuthenticityType_REPUDIABLE AuthenticityType = 1
    18  	AuthenticityType_ANONYMOUS  AuthenticityType = 2
    19  )
    20  
    21  func (o AuthenticityType) DeepCopy() AuthenticityType { return o }
    22  
    23  var AuthenticityTypeMap = map[string]AuthenticityType{
    24  	"SIGNED":     0,
    25  	"REPUDIABLE": 1,
    26  	"ANONYMOUS":  2,
    27  }
    28  
    29  var AuthenticityTypeRevMap = map[AuthenticityType]string{
    30  	0: "SIGNED",
    31  	1: "REPUDIABLE",
    32  	2: "ANONYMOUS",
    33  }
    34  
    35  func (e AuthenticityType) String() string {
    36  	if v, ok := AuthenticityTypeRevMap[e]; ok {
    37  		return v
    38  	}
    39  	return fmt.Sprintf("%v", int(e))
    40  }
    41  
    42  type SaltpackEncryptOptions struct {
    43  	Recipients                []string         `codec:"recipients" json:"recipients"`
    44  	TeamRecipients            []string         `codec:"teamRecipients" json:"teamRecipients"`
    45  	AuthenticityType          AuthenticityType `codec:"authenticityType" json:"authenticityType"`
    46  	UseEntityKeys             bool             `codec:"useEntityKeys" json:"useEntityKeys"`
    47  	UseDeviceKeys             bool             `codec:"useDeviceKeys" json:"useDeviceKeys"`
    48  	UsePaperKeys              bool             `codec:"usePaperKeys" json:"usePaperKeys"`
    49  	NoSelfEncrypt             bool             `codec:"noSelfEncrypt" json:"noSelfEncrypt"`
    50  	Binary                    bool             `codec:"binary" json:"binary"`
    51  	SaltpackVersion           int              `codec:"saltpackVersion" json:"saltpackVersion"`
    52  	NoForcePoll               bool             `codec:"noForcePoll" json:"noForcePoll"`
    53  	UseKBFSKeysOnlyForTesting bool             `codec:"useKBFSKeysOnlyForTesting" json:"useKBFSKeysOnlyForTesting"`
    54  }
    55  
    56  func (o SaltpackEncryptOptions) DeepCopy() SaltpackEncryptOptions {
    57  	return SaltpackEncryptOptions{
    58  		Recipients: (func(x []string) []string {
    59  			if x == nil {
    60  				return nil
    61  			}
    62  			ret := make([]string, len(x))
    63  			for i, v := range x {
    64  				vCopy := v
    65  				ret[i] = vCopy
    66  			}
    67  			return ret
    68  		})(o.Recipients),
    69  		TeamRecipients: (func(x []string) []string {
    70  			if x == nil {
    71  				return nil
    72  			}
    73  			ret := make([]string, len(x))
    74  			for i, v := range x {
    75  				vCopy := v
    76  				ret[i] = vCopy
    77  			}
    78  			return ret
    79  		})(o.TeamRecipients),
    80  		AuthenticityType:          o.AuthenticityType.DeepCopy(),
    81  		UseEntityKeys:             o.UseEntityKeys,
    82  		UseDeviceKeys:             o.UseDeviceKeys,
    83  		UsePaperKeys:              o.UsePaperKeys,
    84  		NoSelfEncrypt:             o.NoSelfEncrypt,
    85  		Binary:                    o.Binary,
    86  		SaltpackVersion:           o.SaltpackVersion,
    87  		NoForcePoll:               o.NoForcePoll,
    88  		UseKBFSKeysOnlyForTesting: o.UseKBFSKeysOnlyForTesting,
    89  	}
    90  }
    91  
    92  type SaltpackDecryptOptions struct {
    93  	Interactive      bool `codec:"interactive" json:"interactive"`
    94  	ForceRemoteCheck bool `codec:"forceRemoteCheck" json:"forceRemoteCheck"`
    95  	UsePaperKey      bool `codec:"usePaperKey" json:"usePaperKey"`
    96  }
    97  
    98  func (o SaltpackDecryptOptions) DeepCopy() SaltpackDecryptOptions {
    99  	return SaltpackDecryptOptions{
   100  		Interactive:      o.Interactive,
   101  		ForceRemoteCheck: o.ForceRemoteCheck,
   102  		UsePaperKey:      o.UsePaperKey,
   103  	}
   104  }
   105  
   106  type SaltpackSignOptions struct {
   107  	Detached        bool `codec:"detached" json:"detached"`
   108  	Binary          bool `codec:"binary" json:"binary"`
   109  	SaltpackVersion int  `codec:"saltpackVersion" json:"saltpackVersion"`
   110  }
   111  
   112  func (o SaltpackSignOptions) DeepCopy() SaltpackSignOptions {
   113  	return SaltpackSignOptions{
   114  		Detached:        o.Detached,
   115  		Binary:          o.Binary,
   116  		SaltpackVersion: o.SaltpackVersion,
   117  	}
   118  }
   119  
   120  type SaltpackVerifyOptions struct {
   121  	SignedBy  string `codec:"signedBy" json:"signedBy"`
   122  	Signature []byte `codec:"signature" json:"signature"`
   123  }
   124  
   125  func (o SaltpackVerifyOptions) DeepCopy() SaltpackVerifyOptions {
   126  	return SaltpackVerifyOptions{
   127  		SignedBy: o.SignedBy,
   128  		Signature: (func(x []byte) []byte {
   129  			if x == nil {
   130  				return nil
   131  			}
   132  			return append([]byte{}, x...)
   133  		})(o.Signature),
   134  	}
   135  }
   136  
   137  type SaltpackEncryptResult struct {
   138  	UsedUnresolvedSBS      bool   `codec:"usedUnresolvedSBS" json:"usedUnresolvedSBS"`
   139  	UnresolvedSBSAssertion string `codec:"unresolvedSBSAssertion" json:"unresolvedSBSAssertion"`
   140  }
   141  
   142  func (o SaltpackEncryptResult) DeepCopy() SaltpackEncryptResult {
   143  	return SaltpackEncryptResult{
   144  		UsedUnresolvedSBS:      o.UsedUnresolvedSBS,
   145  		UnresolvedSBSAssertion: o.UnresolvedSBSAssertion,
   146  	}
   147  }
   148  
   149  type SaltpackEncryptedMessageInfo struct {
   150  	Devices          []Device       `codec:"devices" json:"devices"`
   151  	NumAnonReceivers int            `codec:"numAnonReceivers" json:"numAnonReceivers"`
   152  	ReceiverIsAnon   bool           `codec:"receiverIsAnon" json:"receiverIsAnon"`
   153  	Sender           SaltpackSender `codec:"sender" json:"sender"`
   154  }
   155  
   156  func (o SaltpackEncryptedMessageInfo) DeepCopy() SaltpackEncryptedMessageInfo {
   157  	return SaltpackEncryptedMessageInfo{
   158  		Devices: (func(x []Device) []Device {
   159  			if x == nil {
   160  				return nil
   161  			}
   162  			ret := make([]Device, len(x))
   163  			for i, v := range x {
   164  				vCopy := v.DeepCopy()
   165  				ret[i] = vCopy
   166  			}
   167  			return ret
   168  		})(o.Devices),
   169  		NumAnonReceivers: o.NumAnonReceivers,
   170  		ReceiverIsAnon:   o.ReceiverIsAnon,
   171  		Sender:           o.Sender.DeepCopy(),
   172  	}
   173  }
   174  
   175  type SaltpackFrontendEncryptOptions struct {
   176  	Recipients  []string `codec:"recipients" json:"recipients"`
   177  	Signed      bool     `codec:"signed" json:"signed"`
   178  	IncludeSelf bool     `codec:"includeSelf" json:"includeSelf"`
   179  }
   180  
   181  func (o SaltpackFrontendEncryptOptions) DeepCopy() SaltpackFrontendEncryptOptions {
   182  	return SaltpackFrontendEncryptOptions{
   183  		Recipients: (func(x []string) []string {
   184  			if x == nil {
   185  				return nil
   186  			}
   187  			ret := make([]string, len(x))
   188  			for i, v := range x {
   189  				vCopy := v
   190  				ret[i] = vCopy
   191  			}
   192  			return ret
   193  		})(o.Recipients),
   194  		Signed:      o.Signed,
   195  		IncludeSelf: o.IncludeSelf,
   196  	}
   197  }
   198  
   199  type SaltpackEncryptStringResult struct {
   200  	UsedUnresolvedSBS      bool   `codec:"usedUnresolvedSBS" json:"usedUnresolvedSBS"`
   201  	UnresolvedSBSAssertion string `codec:"unresolvedSBSAssertion" json:"unresolvedSBSAssertion"`
   202  	Ciphertext             string `codec:"ciphertext" json:"ciphertext"`
   203  }
   204  
   205  func (o SaltpackEncryptStringResult) DeepCopy() SaltpackEncryptStringResult {
   206  	return SaltpackEncryptStringResult{
   207  		UsedUnresolvedSBS:      o.UsedUnresolvedSBS,
   208  		UnresolvedSBSAssertion: o.UnresolvedSBSAssertion,
   209  		Ciphertext:             o.Ciphertext,
   210  	}
   211  }
   212  
   213  type SaltpackEncryptFileResult struct {
   214  	UsedUnresolvedSBS      bool   `codec:"usedUnresolvedSBS" json:"usedUnresolvedSBS"`
   215  	UnresolvedSBSAssertion string `codec:"unresolvedSBSAssertion" json:"unresolvedSBSAssertion"`
   216  	Filename               string `codec:"filename" json:"filename"`
   217  }
   218  
   219  func (o SaltpackEncryptFileResult) DeepCopy() SaltpackEncryptFileResult {
   220  	return SaltpackEncryptFileResult{
   221  		UsedUnresolvedSBS:      o.UsedUnresolvedSBS,
   222  		UnresolvedSBSAssertion: o.UnresolvedSBSAssertion,
   223  		Filename:               o.Filename,
   224  	}
   225  }
   226  
   227  type SaltpackPlaintextResult struct {
   228  	Info      SaltpackEncryptedMessageInfo `codec:"info" json:"info"`
   229  	Plaintext string                       `codec:"plaintext" json:"plaintext"`
   230  	Signed    bool                         `codec:"signed" json:"signed"`
   231  }
   232  
   233  func (o SaltpackPlaintextResult) DeepCopy() SaltpackPlaintextResult {
   234  	return SaltpackPlaintextResult{
   235  		Info:      o.Info.DeepCopy(),
   236  		Plaintext: o.Plaintext,
   237  		Signed:    o.Signed,
   238  	}
   239  }
   240  
   241  type SaltpackFileResult struct {
   242  	Info              SaltpackEncryptedMessageInfo `codec:"info" json:"info"`
   243  	DecryptedFilename string                       `codec:"decryptedFilename" json:"decryptedFilename"`
   244  	Signed            bool                         `codec:"signed" json:"signed"`
   245  }
   246  
   247  func (o SaltpackFileResult) DeepCopy() SaltpackFileResult {
   248  	return SaltpackFileResult{
   249  		Info:              o.Info.DeepCopy(),
   250  		DecryptedFilename: o.DecryptedFilename,
   251  		Signed:            o.Signed,
   252  	}
   253  }
   254  
   255  type SaltpackVerifyResult struct {
   256  	SigningKID KID            `codec:"signingKID" json:"signingKID"`
   257  	Sender     SaltpackSender `codec:"sender" json:"sender"`
   258  	Plaintext  string         `codec:"plaintext" json:"plaintext"`
   259  	Verified   bool           `codec:"verified" json:"verified"`
   260  }
   261  
   262  func (o SaltpackVerifyResult) DeepCopy() SaltpackVerifyResult {
   263  	return SaltpackVerifyResult{
   264  		SigningKID: o.SigningKID.DeepCopy(),
   265  		Sender:     o.Sender.DeepCopy(),
   266  		Plaintext:  o.Plaintext,
   267  		Verified:   o.Verified,
   268  	}
   269  }
   270  
   271  type SaltpackVerifyFileResult struct {
   272  	SigningKID       KID            `codec:"signingKID" json:"signingKID"`
   273  	Sender           SaltpackSender `codec:"sender" json:"sender"`
   274  	VerifiedFilename string         `codec:"verifiedFilename" json:"verifiedFilename"`
   275  	Verified         bool           `codec:"verified" json:"verified"`
   276  }
   277  
   278  func (o SaltpackVerifyFileResult) DeepCopy() SaltpackVerifyFileResult {
   279  	return SaltpackVerifyFileResult{
   280  		SigningKID:       o.SigningKID.DeepCopy(),
   281  		Sender:           o.Sender.DeepCopy(),
   282  		VerifiedFilename: o.VerifiedFilename,
   283  		Verified:         o.Verified,
   284  	}
   285  }
   286  
   287  type SaltpackEncryptArg struct {
   288  	SessionID int                    `codec:"sessionID" json:"sessionID"`
   289  	Source    Stream                 `codec:"source" json:"source"`
   290  	Sink      Stream                 `codec:"sink" json:"sink"`
   291  	Opts      SaltpackEncryptOptions `codec:"opts" json:"opts"`
   292  }
   293  
   294  type SaltpackDecryptArg struct {
   295  	SessionID int                    `codec:"sessionID" json:"sessionID"`
   296  	Source    Stream                 `codec:"source" json:"source"`
   297  	Sink      Stream                 `codec:"sink" json:"sink"`
   298  	Opts      SaltpackDecryptOptions `codec:"opts" json:"opts"`
   299  }
   300  
   301  type SaltpackSignArg struct {
   302  	SessionID int                 `codec:"sessionID" json:"sessionID"`
   303  	Source    Stream              `codec:"source" json:"source"`
   304  	Sink      Stream              `codec:"sink" json:"sink"`
   305  	Opts      SaltpackSignOptions `codec:"opts" json:"opts"`
   306  }
   307  
   308  type SaltpackVerifyArg struct {
   309  	SessionID int                   `codec:"sessionID" json:"sessionID"`
   310  	Source    Stream                `codec:"source" json:"source"`
   311  	Sink      Stream                `codec:"sink" json:"sink"`
   312  	Opts      SaltpackVerifyOptions `codec:"opts" json:"opts"`
   313  }
   314  
   315  type SaltpackEncryptStringArg struct {
   316  	SessionID int                            `codec:"sessionID" json:"sessionID"`
   317  	Plaintext string                         `codec:"plaintext" json:"plaintext"`
   318  	Opts      SaltpackFrontendEncryptOptions `codec:"opts" json:"opts"`
   319  }
   320  
   321  type SaltpackEncryptStringToTextFileArg struct {
   322  	SessionID int                            `codec:"sessionID" json:"sessionID"`
   323  	Plaintext string                         `codec:"plaintext" json:"plaintext"`
   324  	Opts      SaltpackFrontendEncryptOptions `codec:"opts" json:"opts"`
   325  }
   326  
   327  type SaltpackEncryptFileArg struct {
   328  	SessionID      int                            `codec:"sessionID" json:"sessionID"`
   329  	Filename       string                         `codec:"filename" json:"filename"`
   330  	DestinationDir string                         `codec:"destinationDir" json:"destinationDir"`
   331  	Opts           SaltpackFrontendEncryptOptions `codec:"opts" json:"opts"`
   332  }
   333  
   334  type SaltpackDecryptStringArg struct {
   335  	SessionID  int    `codec:"sessionID" json:"sessionID"`
   336  	Ciphertext string `codec:"ciphertext" json:"ciphertext"`
   337  }
   338  
   339  type SaltpackDecryptFileArg struct {
   340  	SessionID         int    `codec:"sessionID" json:"sessionID"`
   341  	EncryptedFilename string `codec:"encryptedFilename" json:"encryptedFilename"`
   342  	DestinationDir    string `codec:"destinationDir" json:"destinationDir"`
   343  }
   344  
   345  type SaltpackSignStringArg struct {
   346  	SessionID int    `codec:"sessionID" json:"sessionID"`
   347  	Plaintext string `codec:"plaintext" json:"plaintext"`
   348  }
   349  
   350  type SaltpackSignStringToTextFileArg struct {
   351  	SessionID int    `codec:"sessionID" json:"sessionID"`
   352  	Plaintext string `codec:"plaintext" json:"plaintext"`
   353  }
   354  
   355  type SaltpackSignFileArg struct {
   356  	SessionID      int    `codec:"sessionID" json:"sessionID"`
   357  	Filename       string `codec:"filename" json:"filename"`
   358  	DestinationDir string `codec:"destinationDir" json:"destinationDir"`
   359  }
   360  
   361  type SaltpackSaveCiphertextToFileArg struct {
   362  	SessionID  int    `codec:"sessionID" json:"sessionID"`
   363  	Ciphertext string `codec:"ciphertext" json:"ciphertext"`
   364  }
   365  
   366  type SaltpackSaveSignedMsgToFileArg struct {
   367  	SessionID int    `codec:"sessionID" json:"sessionID"`
   368  	SignedMsg string `codec:"signedMsg" json:"signedMsg"`
   369  }
   370  
   371  type SaltpackVerifyStringArg struct {
   372  	SessionID int    `codec:"sessionID" json:"sessionID"`
   373  	SignedMsg string `codec:"signedMsg" json:"signedMsg"`
   374  }
   375  
   376  type SaltpackVerifyFileArg struct {
   377  	SessionID      int    `codec:"sessionID" json:"sessionID"`
   378  	SignedFilename string `codec:"signedFilename" json:"signedFilename"`
   379  	DestinationDir string `codec:"destinationDir" json:"destinationDir"`
   380  }
   381  
   382  type SaltpackInterface interface {
   383  	SaltpackEncrypt(context.Context, SaltpackEncryptArg) (SaltpackEncryptResult, error)
   384  	SaltpackDecrypt(context.Context, SaltpackDecryptArg) (SaltpackEncryptedMessageInfo, error)
   385  	SaltpackSign(context.Context, SaltpackSignArg) error
   386  	SaltpackVerify(context.Context, SaltpackVerifyArg) error
   387  	SaltpackEncryptString(context.Context, SaltpackEncryptStringArg) (SaltpackEncryptStringResult, error)
   388  	SaltpackEncryptStringToTextFile(context.Context, SaltpackEncryptStringToTextFileArg) (SaltpackEncryptFileResult, error)
   389  	SaltpackEncryptFile(context.Context, SaltpackEncryptFileArg) (SaltpackEncryptFileResult, error)
   390  	SaltpackDecryptString(context.Context, SaltpackDecryptStringArg) (SaltpackPlaintextResult, error)
   391  	SaltpackDecryptFile(context.Context, SaltpackDecryptFileArg) (SaltpackFileResult, error)
   392  	SaltpackSignString(context.Context, SaltpackSignStringArg) (string, error)
   393  	SaltpackSignStringToTextFile(context.Context, SaltpackSignStringToTextFileArg) (string, error)
   394  	SaltpackSignFile(context.Context, SaltpackSignFileArg) (string, error)
   395  	SaltpackSaveCiphertextToFile(context.Context, SaltpackSaveCiphertextToFileArg) (string, error)
   396  	SaltpackSaveSignedMsgToFile(context.Context, SaltpackSaveSignedMsgToFileArg) (string, error)
   397  	SaltpackVerifyString(context.Context, SaltpackVerifyStringArg) (SaltpackVerifyResult, error)
   398  	SaltpackVerifyFile(context.Context, SaltpackVerifyFileArg) (SaltpackVerifyFileResult, error)
   399  }
   400  
   401  func SaltpackProtocol(i SaltpackInterface) rpc.Protocol {
   402  	return rpc.Protocol{
   403  		Name: "keybase.1.saltpack",
   404  		Methods: map[string]rpc.ServeHandlerDescription{
   405  			"saltpackEncrypt": {
   406  				MakeArg: func() interface{} {
   407  					var ret [1]SaltpackEncryptArg
   408  					return &ret
   409  				},
   410  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   411  					typedArgs, ok := args.(*[1]SaltpackEncryptArg)
   412  					if !ok {
   413  						err = rpc.NewTypeError((*[1]SaltpackEncryptArg)(nil), args)
   414  						return
   415  					}
   416  					ret, err = i.SaltpackEncrypt(ctx, typedArgs[0])
   417  					return
   418  				},
   419  			},
   420  			"saltpackDecrypt": {
   421  				MakeArg: func() interface{} {
   422  					var ret [1]SaltpackDecryptArg
   423  					return &ret
   424  				},
   425  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   426  					typedArgs, ok := args.(*[1]SaltpackDecryptArg)
   427  					if !ok {
   428  						err = rpc.NewTypeError((*[1]SaltpackDecryptArg)(nil), args)
   429  						return
   430  					}
   431  					ret, err = i.SaltpackDecrypt(ctx, typedArgs[0])
   432  					return
   433  				},
   434  			},
   435  			"saltpackSign": {
   436  				MakeArg: func() interface{} {
   437  					var ret [1]SaltpackSignArg
   438  					return &ret
   439  				},
   440  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   441  					typedArgs, ok := args.(*[1]SaltpackSignArg)
   442  					if !ok {
   443  						err = rpc.NewTypeError((*[1]SaltpackSignArg)(nil), args)
   444  						return
   445  					}
   446  					err = i.SaltpackSign(ctx, typedArgs[0])
   447  					return
   448  				},
   449  			},
   450  			"saltpackVerify": {
   451  				MakeArg: func() interface{} {
   452  					var ret [1]SaltpackVerifyArg
   453  					return &ret
   454  				},
   455  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   456  					typedArgs, ok := args.(*[1]SaltpackVerifyArg)
   457  					if !ok {
   458  						err = rpc.NewTypeError((*[1]SaltpackVerifyArg)(nil), args)
   459  						return
   460  					}
   461  					err = i.SaltpackVerify(ctx, typedArgs[0])
   462  					return
   463  				},
   464  			},
   465  			"saltpackEncryptString": {
   466  				MakeArg: func() interface{} {
   467  					var ret [1]SaltpackEncryptStringArg
   468  					return &ret
   469  				},
   470  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   471  					typedArgs, ok := args.(*[1]SaltpackEncryptStringArg)
   472  					if !ok {
   473  						err = rpc.NewTypeError((*[1]SaltpackEncryptStringArg)(nil), args)
   474  						return
   475  					}
   476  					ret, err = i.SaltpackEncryptString(ctx, typedArgs[0])
   477  					return
   478  				},
   479  			},
   480  			"saltpackEncryptStringToTextFile": {
   481  				MakeArg: func() interface{} {
   482  					var ret [1]SaltpackEncryptStringToTextFileArg
   483  					return &ret
   484  				},
   485  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   486  					typedArgs, ok := args.(*[1]SaltpackEncryptStringToTextFileArg)
   487  					if !ok {
   488  						err = rpc.NewTypeError((*[1]SaltpackEncryptStringToTextFileArg)(nil), args)
   489  						return
   490  					}
   491  					ret, err = i.SaltpackEncryptStringToTextFile(ctx, typedArgs[0])
   492  					return
   493  				},
   494  			},
   495  			"saltpackEncryptFile": {
   496  				MakeArg: func() interface{} {
   497  					var ret [1]SaltpackEncryptFileArg
   498  					return &ret
   499  				},
   500  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   501  					typedArgs, ok := args.(*[1]SaltpackEncryptFileArg)
   502  					if !ok {
   503  						err = rpc.NewTypeError((*[1]SaltpackEncryptFileArg)(nil), args)
   504  						return
   505  					}
   506  					ret, err = i.SaltpackEncryptFile(ctx, typedArgs[0])
   507  					return
   508  				},
   509  			},
   510  			"saltpackDecryptString": {
   511  				MakeArg: func() interface{} {
   512  					var ret [1]SaltpackDecryptStringArg
   513  					return &ret
   514  				},
   515  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   516  					typedArgs, ok := args.(*[1]SaltpackDecryptStringArg)
   517  					if !ok {
   518  						err = rpc.NewTypeError((*[1]SaltpackDecryptStringArg)(nil), args)
   519  						return
   520  					}
   521  					ret, err = i.SaltpackDecryptString(ctx, typedArgs[0])
   522  					return
   523  				},
   524  			},
   525  			"saltpackDecryptFile": {
   526  				MakeArg: func() interface{} {
   527  					var ret [1]SaltpackDecryptFileArg
   528  					return &ret
   529  				},
   530  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   531  					typedArgs, ok := args.(*[1]SaltpackDecryptFileArg)
   532  					if !ok {
   533  						err = rpc.NewTypeError((*[1]SaltpackDecryptFileArg)(nil), args)
   534  						return
   535  					}
   536  					ret, err = i.SaltpackDecryptFile(ctx, typedArgs[0])
   537  					return
   538  				},
   539  			},
   540  			"saltpackSignString": {
   541  				MakeArg: func() interface{} {
   542  					var ret [1]SaltpackSignStringArg
   543  					return &ret
   544  				},
   545  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   546  					typedArgs, ok := args.(*[1]SaltpackSignStringArg)
   547  					if !ok {
   548  						err = rpc.NewTypeError((*[1]SaltpackSignStringArg)(nil), args)
   549  						return
   550  					}
   551  					ret, err = i.SaltpackSignString(ctx, typedArgs[0])
   552  					return
   553  				},
   554  			},
   555  			"saltpackSignStringToTextFile": {
   556  				MakeArg: func() interface{} {
   557  					var ret [1]SaltpackSignStringToTextFileArg
   558  					return &ret
   559  				},
   560  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   561  					typedArgs, ok := args.(*[1]SaltpackSignStringToTextFileArg)
   562  					if !ok {
   563  						err = rpc.NewTypeError((*[1]SaltpackSignStringToTextFileArg)(nil), args)
   564  						return
   565  					}
   566  					ret, err = i.SaltpackSignStringToTextFile(ctx, typedArgs[0])
   567  					return
   568  				},
   569  			},
   570  			"saltpackSignFile": {
   571  				MakeArg: func() interface{} {
   572  					var ret [1]SaltpackSignFileArg
   573  					return &ret
   574  				},
   575  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   576  					typedArgs, ok := args.(*[1]SaltpackSignFileArg)
   577  					if !ok {
   578  						err = rpc.NewTypeError((*[1]SaltpackSignFileArg)(nil), args)
   579  						return
   580  					}
   581  					ret, err = i.SaltpackSignFile(ctx, typedArgs[0])
   582  					return
   583  				},
   584  			},
   585  			"saltpackSaveCiphertextToFile": {
   586  				MakeArg: func() interface{} {
   587  					var ret [1]SaltpackSaveCiphertextToFileArg
   588  					return &ret
   589  				},
   590  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   591  					typedArgs, ok := args.(*[1]SaltpackSaveCiphertextToFileArg)
   592  					if !ok {
   593  						err = rpc.NewTypeError((*[1]SaltpackSaveCiphertextToFileArg)(nil), args)
   594  						return
   595  					}
   596  					ret, err = i.SaltpackSaveCiphertextToFile(ctx, typedArgs[0])
   597  					return
   598  				},
   599  			},
   600  			"saltpackSaveSignedMsgToFile": {
   601  				MakeArg: func() interface{} {
   602  					var ret [1]SaltpackSaveSignedMsgToFileArg
   603  					return &ret
   604  				},
   605  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   606  					typedArgs, ok := args.(*[1]SaltpackSaveSignedMsgToFileArg)
   607  					if !ok {
   608  						err = rpc.NewTypeError((*[1]SaltpackSaveSignedMsgToFileArg)(nil), args)
   609  						return
   610  					}
   611  					ret, err = i.SaltpackSaveSignedMsgToFile(ctx, typedArgs[0])
   612  					return
   613  				},
   614  			},
   615  			"saltpackVerifyString": {
   616  				MakeArg: func() interface{} {
   617  					var ret [1]SaltpackVerifyStringArg
   618  					return &ret
   619  				},
   620  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   621  					typedArgs, ok := args.(*[1]SaltpackVerifyStringArg)
   622  					if !ok {
   623  						err = rpc.NewTypeError((*[1]SaltpackVerifyStringArg)(nil), args)
   624  						return
   625  					}
   626  					ret, err = i.SaltpackVerifyString(ctx, typedArgs[0])
   627  					return
   628  				},
   629  			},
   630  			"saltpackVerifyFile": {
   631  				MakeArg: func() interface{} {
   632  					var ret [1]SaltpackVerifyFileArg
   633  					return &ret
   634  				},
   635  				Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
   636  					typedArgs, ok := args.(*[1]SaltpackVerifyFileArg)
   637  					if !ok {
   638  						err = rpc.NewTypeError((*[1]SaltpackVerifyFileArg)(nil), args)
   639  						return
   640  					}
   641  					ret, err = i.SaltpackVerifyFile(ctx, typedArgs[0])
   642  					return
   643  				},
   644  			},
   645  		},
   646  	}
   647  }
   648  
   649  type SaltpackClient struct {
   650  	Cli rpc.GenericClient
   651  }
   652  
   653  func (c SaltpackClient) SaltpackEncrypt(ctx context.Context, __arg SaltpackEncryptArg) (res SaltpackEncryptResult, err error) {
   654  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackEncrypt", []interface{}{__arg}, &res, 0*time.Millisecond)
   655  	return
   656  }
   657  
   658  func (c SaltpackClient) SaltpackDecrypt(ctx context.Context, __arg SaltpackDecryptArg) (res SaltpackEncryptedMessageInfo, err error) {
   659  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackDecrypt", []interface{}{__arg}, &res, 0*time.Millisecond)
   660  	return
   661  }
   662  
   663  func (c SaltpackClient) SaltpackSign(ctx context.Context, __arg SaltpackSignArg) (err error) {
   664  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackSign", []interface{}{__arg}, nil, 0*time.Millisecond)
   665  	return
   666  }
   667  
   668  func (c SaltpackClient) SaltpackVerify(ctx context.Context, __arg SaltpackVerifyArg) (err error) {
   669  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackVerify", []interface{}{__arg}, nil, 0*time.Millisecond)
   670  	return
   671  }
   672  
   673  func (c SaltpackClient) SaltpackEncryptString(ctx context.Context, __arg SaltpackEncryptStringArg) (res SaltpackEncryptStringResult, err error) {
   674  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackEncryptString", []interface{}{__arg}, &res, 0*time.Millisecond)
   675  	return
   676  }
   677  
   678  func (c SaltpackClient) SaltpackEncryptStringToTextFile(ctx context.Context, __arg SaltpackEncryptStringToTextFileArg) (res SaltpackEncryptFileResult, err error) {
   679  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackEncryptStringToTextFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   680  	return
   681  }
   682  
   683  func (c SaltpackClient) SaltpackEncryptFile(ctx context.Context, __arg SaltpackEncryptFileArg) (res SaltpackEncryptFileResult, err error) {
   684  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackEncryptFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   685  	return
   686  }
   687  
   688  func (c SaltpackClient) SaltpackDecryptString(ctx context.Context, __arg SaltpackDecryptStringArg) (res SaltpackPlaintextResult, err error) {
   689  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackDecryptString", []interface{}{__arg}, &res, 0*time.Millisecond)
   690  	return
   691  }
   692  
   693  func (c SaltpackClient) SaltpackDecryptFile(ctx context.Context, __arg SaltpackDecryptFileArg) (res SaltpackFileResult, err error) {
   694  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackDecryptFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   695  	return
   696  }
   697  
   698  func (c SaltpackClient) SaltpackSignString(ctx context.Context, __arg SaltpackSignStringArg) (res string, err error) {
   699  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackSignString", []interface{}{__arg}, &res, 0*time.Millisecond)
   700  	return
   701  }
   702  
   703  func (c SaltpackClient) SaltpackSignStringToTextFile(ctx context.Context, __arg SaltpackSignStringToTextFileArg) (res string, err error) {
   704  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackSignStringToTextFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   705  	return
   706  }
   707  
   708  func (c SaltpackClient) SaltpackSignFile(ctx context.Context, __arg SaltpackSignFileArg) (res string, err error) {
   709  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackSignFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   710  	return
   711  }
   712  
   713  func (c SaltpackClient) SaltpackSaveCiphertextToFile(ctx context.Context, __arg SaltpackSaveCiphertextToFileArg) (res string, err error) {
   714  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackSaveCiphertextToFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   715  	return
   716  }
   717  
   718  func (c SaltpackClient) SaltpackSaveSignedMsgToFile(ctx context.Context, __arg SaltpackSaveSignedMsgToFileArg) (res string, err error) {
   719  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackSaveSignedMsgToFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   720  	return
   721  }
   722  
   723  func (c SaltpackClient) SaltpackVerifyString(ctx context.Context, __arg SaltpackVerifyStringArg) (res SaltpackVerifyResult, err error) {
   724  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackVerifyString", []interface{}{__arg}, &res, 0*time.Millisecond)
   725  	return
   726  }
   727  
   728  func (c SaltpackClient) SaltpackVerifyFile(ctx context.Context, __arg SaltpackVerifyFileArg) (res SaltpackVerifyFileResult, err error) {
   729  	err = c.Cli.Call(ctx, "keybase.1.saltpack.saltpackVerifyFile", []interface{}{__arg}, &res, 0*time.Millisecond)
   730  	return
   731  }