micro-sol-signer
Version:
Create, sign & decode Solana transactions with minimum deps
1,047 lines • 40 kB
JavaScript
export default {
kind: 'rootNode',
program: {
kind: 'programNode',
pdas: [],
accounts: [
{
kind: 'accountNode',
data: {
kind: 'structTypeNode',
fields: [
{
kind: 'structFieldTypeNode',
name: 'version',
type: { kind: 'definedTypeLinkNode', name: 'nonceVersion' },
docs: [],
},
{
kind: 'structFieldTypeNode',
name: 'state',
type: { kind: 'definedTypeLinkNode', name: 'nonceState' },
docs: [],
},
{
kind: 'structFieldTypeNode',
name: 'authority',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
{
kind: 'structFieldTypeNode',
name: 'blockhash',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
{
kind: 'structFieldTypeNode',
name: 'lamportsPerSignature',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
],
},
name: 'nonce',
idlName: 'Nonce',
docs: [],
size: 80,
},
],
instructions: [
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'payer',
isWritable: true,
isSigner: true,
isOptional: false,
docs: [],
defaultValue: { kind: 'payerValueNode' },
},
{
kind: 'instructionAccountNode',
name: 'newAccount',
isWritable: true,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 0 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'lamports',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'space',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'programAddress',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
byteDeltas: [
{
kind: 'instructionByteDeltaNode',
value: { kind: 'argumentValueNode', name: 'space' },
withHeader: true,
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'createAccount',
idlName: 'CreateAccount',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'account',
isWritable: true,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 1 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'programAddress',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'assign',
idlName: 'Assign',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'source',
isWritable: true,
isSigner: true,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'destination',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 2 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'amount',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'transferSol',
idlName: 'TransferSol',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'payer',
isWritable: true,
isSigner: true,
isOptional: false,
docs: [],
defaultValue: { kind: 'payerValueNode' },
},
{
kind: 'instructionAccountNode',
name: 'newAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'baseAccount',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 3 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'base',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'seed',
type: {
kind: 'sizePrefixTypeNode',
type: { kind: 'stringTypeNode', encoding: 'utf8' },
prefix: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'amount',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'space',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'programAddress',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'createAccountWithSeed',
idlName: 'CreateAccountWithSeed',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'nonceAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'recentBlockhashesSysvar',
isWritable: false,
isSigner: false,
isOptional: false,
docs: [],
defaultValue: {
kind: 'publicKeyValueNode',
publicKey: 'SysvarRecentB1ockHashes11111111111111111111',
},
},
{
kind: 'instructionAccountNode',
name: 'nonceAuthority',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 4 },
defaultValueStrategy: 'omitted',
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'advanceNonceAccount',
idlName: 'AdvanceNonceAccount',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'nonceAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'recipientAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'recentBlockhashesSysvar',
isWritable: false,
isSigner: false,
isOptional: false,
docs: [],
defaultValue: {
kind: 'publicKeyValueNode',
publicKey: 'SysvarRecentB1ockHashes11111111111111111111',
},
},
{
kind: 'instructionAccountNode',
name: 'rentSysvar',
isWritable: false,
isSigner: false,
isOptional: false,
docs: [],
defaultValue: {
kind: 'publicKeyValueNode',
publicKey: 'SysvarRent111111111111111111111111111111111',
},
},
{
kind: 'instructionAccountNode',
name: 'nonceAuthority',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 5 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'withdrawAmount',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'withdrawNonceAccount',
idlName: 'WithdrawNonceAccount',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'nonceAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'recentBlockhashesSysvar',
isWritable: false,
isSigner: false,
isOptional: false,
docs: [],
defaultValue: {
kind: 'publicKeyValueNode',
publicKey: 'SysvarRecentB1ockHashes11111111111111111111',
},
},
{
kind: 'instructionAccountNode',
name: 'rentSysvar',
isWritable: false,
isSigner: false,
isOptional: false,
docs: [],
defaultValue: {
kind: 'publicKeyValueNode',
publicKey: 'SysvarRent111111111111111111111111111111111',
},
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 6 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'nonceAuthority',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'initializeNonceAccount',
idlName: 'InitializeNonceAccount',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'nonceAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'nonceAuthority',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 7 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'newNonceAuthority',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'authorizeNonceAccount',
idlName: 'AuthorizeNonceAccount',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'newAccount',
isWritable: true,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 8 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'space',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'allocate',
idlName: 'Allocate',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'newAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'baseAccount',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 9 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'base',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'seed',
type: {
kind: 'sizePrefixTypeNode',
type: { kind: 'stringTypeNode', encoding: 'utf8' },
prefix: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'space',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'programAddress',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'allocateWithSeed',
idlName: 'AllocateWithSeed',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'account',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'baseAccount',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 10 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'base',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'seed',
type: {
kind: 'sizePrefixTypeNode',
type: { kind: 'stringTypeNode', encoding: 'utf8' },
prefix: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'programAddress',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'assignWithSeed',
idlName: 'AssignWithSeed',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'source',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'baseAccount',
isWritable: false,
isSigner: true,
isOptional: false,
docs: [],
},
{
kind: 'instructionAccountNode',
name: 'destination',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 11 },
defaultValueStrategy: 'omitted',
},
{
kind: 'instructionArgumentNode',
name: 'amount',
type: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'fromSeed',
type: {
kind: 'sizePrefixTypeNode',
type: { kind: 'stringTypeNode', encoding: 'utf8' },
prefix: {
kind: 'numberTypeNode',
format: 'u64',
endian: 'le',
},
},
docs: [],
},
{
kind: 'instructionArgumentNode',
name: 'fromOwner',
type: { kind: 'publicKeyTypeNode' },
docs: [],
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'transferSolWithSeed',
idlName: 'TransferSolWithSeed',
docs: [],
optionalAccountStrategy: 'programId',
},
{
kind: 'instructionNode',
accounts: [
{
kind: 'instructionAccountNode',
name: 'nonceAccount',
isWritable: true,
isSigner: false,
isOptional: false,
docs: [],
},
],
arguments: [
{
kind: 'instructionArgumentNode',
name: 'discriminator',
type: {
kind: 'numberTypeNode',
format: 'u32',
endian: 'le',
},
docs: [],
defaultValue: { kind: 'numberValueNode', number: 12 },
defaultValueStrategy: 'omitted',
},
],
discriminators: [
{
kind: 'fieldDiscriminatorNode',
name: 'discriminator',
offset: 0,
},
],
name: 'upgradeNonceAccount',
idlName: 'UpgradeNonceAccount',
docs: [],
optionalAccountStrategy: 'programId',
},
],
definedTypes: [
{
kind: 'definedTypeNode',
name: 'nonceVersion',
type: {
kind: 'enumTypeNode',
variants: [
{ kind: 'enumEmptyVariantTypeNode', name: 'legacy' },
{ kind: 'enumEmptyVariantTypeNode', name: 'current' },
],
size: { kind: 'numberTypeNode', format: 'u32', endian: 'le' },
},
idlName: 'NonceVersion',
docs: [],
},
{
kind: 'definedTypeNode',
name: 'nonceState',
type: {
kind: 'enumTypeNode',
variants: [
{ kind: 'enumEmptyVariantTypeNode', name: 'uninitialized' },
{ kind: 'enumEmptyVariantTypeNode', name: 'initialized' },
],
size: { kind: 'numberTypeNode', format: 'u32', endian: 'le' },
},
idlName: 'NonceState',
docs: [],
},
],
errors: [
{
kind: 'errorNode',
name: 'accountAlreadyInUse',
idlName: 'AccountAlreadyInUse',
code: 0,
message: 'an account with the same address already exists',
docs: ['AccountAlreadyInUse: an account with the same address already exists'],
},
{
kind: 'errorNode',
name: 'resultWithNegativeLamports',
idlName: 'ResultWithNegativeLamports',
code: 1,
message: 'account does not have enough SOL to perform the operation',
docs: [
'ResultWithNegativeLamports: account does not have enough SOL to perform the operation',
],
},
{
kind: 'errorNode',
name: 'invalidProgramId',
idlName: 'InvalidProgramId',
code: 2,
message: 'cannot assign account to this program id',
docs: ['InvalidProgramId: cannot assign account to this program id'],
},
{
kind: 'errorNode',
name: 'invalidAccountDataLength',
idlName: 'InvalidAccountDataLength',
code: 3,
message: 'cannot allocate account data of this length',
docs: ['InvalidAccountDataLength: cannot allocate account data of this length'],
},
{
kind: 'errorNode',
name: 'maxSeedLengthExceeded',
idlName: 'MaxSeedLengthExceeded',
code: 4,
message: 'length of requested seed is too long',
docs: ['MaxSeedLengthExceeded: length of requested seed is too long'],
},
{
kind: 'errorNode',
name: 'addressWithSeedMismatch',
idlName: 'AddressWithSeedMismatch',
code: 5,
message: 'provided address does not match addressed derived from seed',
docs: [
'AddressWithSeedMismatch: provided address does not match addressed derived from seed',
],
},
{
kind: 'errorNode',
name: 'nonceNoRecentBlockhashes',
idlName: 'NonceNoRecentBlockhashes',
code: 6,
message: 'advancing stored nonce requires a populated RecentBlockhashes sysvar',
docs: [
'NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar',
],
},
{
kind: 'errorNode',
name: 'nonceBlockhashNotExpired',
idlName: 'NonceBlockhashNotExpired',
code: 7,
message: 'stored nonce is still in recent_blockhashes',
docs: ['NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes'],
},
{
kind: 'errorNode',
name: 'nonceUnexpectedBlockhashValue',
idlName: 'NonceUnexpectedBlockhashValue',
code: 8,
message: 'specified nonce does not match stored nonce',
docs: ['NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce'],
},
],
name: 'system',
prefix: '',
publicKey: '11111111111111111111111111111111',
version: '0.0.1',
origin: 'shank',
},
additionalPrograms: [],
standard: 'codama',
version: '1.0.0',
};
//# sourceMappingURL=system.js.map